#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

char* MYIP = "172.28.146.126";

int main(){
    struct in_addr addr;
    inet_pton(AF_INET, MYIP, &addr);
    printf("ip is %u\n", addr.s_addr);
    char buf[20] = {0};
    inet_ntop(AF_INET, &addr, buf, 20);
    printf("ip is %s\n", buf);
    return 0;
}